package so.ifl.servcie;

import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import so.ifl.vo.AccountVo;

/**
 *create by aaron.lu
 *create at 2012-1-7 下午3:24:23
 *<mailto: atyuan.lu@gmail.com>
 **/
@Transactional
public interface AccountService {
	
	/**
	 * 登录查询
	 * create by aaron.lu
	 * create at 2012-4-27 上午11:20:36
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 * @return
	 *
	 */
	public List<AccountVo> queryLoginAccount(Map<String, Object> params);
	
	/**
	 * 查询帐号信息
	 * create by aaron.lu
	 * create at 2012-1-8 下午1:36:29
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 * @param limmit
	 * @param offset
	 * @return
	 *
	 */
	public List<AccountVo> queryAccountWithParamAndPagination(Map<String, Object> params, Integer offset, Integer limit);
	
	/**
	 * 统计帐号信息
	 * create by aaron.lu
	 * create at 2012-1-8 下午1:39:21
	 * <mailto: atyuan.lu@gmail.com>
	 * @param map
	 * @return
	 *
	 */
	public int countAccountWithParam(Map<String, Object> params);
	
	/**
	 * 新增帐号信息
	 * create by aaron.lu
	 * create at 2012-1-8 下午1:42:44
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 *
	 */
	public void insertAccount(Map<String, Object> params);
	
	/**
	 * 更新帐号信息
	 * create by aaron.lu
	 * create at 2012-1-8 下午1:44:56
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 *
	 */
	public void updateAccount(Map<String, Object> params);
	
	/**
	 * 删除帐号信息
	 * create by aaron.lu
	 * create at 2012-1-8 下午1:46:01
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 *
	 */
	public void deleteAccount(Integer accountId);
	
	/**
	 * 初始化应用
	 * create by aaron.lu
	 * create at 2012-1-10 下午4:13:02
	 * <mailto: atyuan.lu@gmail.com>
	 * @param initWord
	 * @param initPwd
	 *
	 */
	public void firstInitApp(String initWord, String initPwd);
	
	/**
	 * 保存更新过的用户角色
	 * create by aaron.lu
	 * create at 2012-1-18 上午12:43:35
	 * <mailto: atyuan.lu@gmail.com>
	 * @param roleId
	 * @param accountId
	 *
	 */
	public void editRoleOfAccount(String roleId, String accountId);

}
